package com.sdry.service.impl.lz;

import com.sdry.mapper.lz.MaintResumeMapper;
import com.sdry.model.lz.*;
import com.sdry.service.lz.MaintResumeService;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

import java.util.List;

/**
 * @ClassName MaintResumeServiceImpl
 * @Description 设备维护维修记录
 * @Author lz
 * @Date 2018年9月25日 16:09:08
 * @Version 1.0
 */
@Service
@Transactional
public class MaintResumeServiceImpl implements MaintResumeService {
    @Resource
    MaintResumeMapper maintResumeMapper;

    /**
     * 设备事故报告添加
     * @param accidentReport
     * @return
     */
    @Override
    public Long addMaintenanceResume(AccidentReport accidentReport) {
        return maintResumeMapper.addMaintenanceResume(accidentReport);
    }

    @Override
    public Long deleteMaintenanceResumeById(long id) {
        return maintResumeMapper.deleteMaintenanceResumeById(id);
    }

    @Override
    public Long editMaintenanceResumeById(AccidentReport accidentReport) {
        return maintResumeMapper.editMaintenanceResumeById(accidentReport);
    }

    @Override
    public List<AccidentReport> queryMaintenanceResume(LzQueryCriteria criteria) {
        return maintResumeMapper.queryMaintenanceResume(criteria);
    }

    @Override
    public int countMaintenanceResume(LzQueryCriteria criteria) {
        return maintResumeMapper.countMaintenanceResume(criteria);
    }



    @Override
    public Long addMaintenanceRecord(MaintenanceRecord maintenanceRecord) {
        return maintResumeMapper.addMaintenanceRecord(maintenanceRecord);
    }

    @Override
    public Long addMaintenanceRecordDetail(MaintenanceRecordDetail maintenanceRecordDetail) {
        return maintResumeMapper.addMaintenanceRecordDetail(maintenanceRecordDetail);
    }

    @Override
    public Long deleteMaintenanceRecordById(long id) {
        return maintResumeMapper.deleteMaintenanceRecordById(id);
    }

    @Override
    public Long editMaintenanceRecordById(MaintenanceRecord maintenanceRecord) {
        return maintResumeMapper.editMaintenanceRecordById(maintenanceRecord);
    }

    @Override
    public List<MaintenanceRecord> queryMaintenanceRecord(LzQueryCriteria criteria) {
        return maintResumeMapper.queryMaintenanceRecord(criteria);
    }

    @Override
    public int countMaintenanceRecord(LzQueryCriteria criteria) {
        return maintResumeMapper.countMaintenanceRecord(criteria);
    }



    @Override
    public Long addDeviceMaintenanceRecords(DeviceMaintenanceRecords deviceMaintenanceRecords) {
        return maintResumeMapper.addDeviceMaintenanceRecords(deviceMaintenanceRecords);
    }

    @Override
    public Long addDeviceMaintenanceRecordsDetail(DeviceMaintenanceRecordsDetail deviceMaintenanceRecordsDetail) {
        return maintResumeMapper.addDeviceMaintenanceRecordsDetail(deviceMaintenanceRecordsDetail);
    }

    @Override
    public Long deleteDeviceMaintenanceRecordsById(long id) {
        return maintResumeMapper.deleteDeviceMaintenanceRecordsById(id);
    }

    @Override
    public Long editDeviceMaintenanceRecordsById(DeviceMaintenanceRecords deviceMaintenanceRecords) {
        return maintResumeMapper.editDeviceMaintenanceRecordsById(deviceMaintenanceRecords);
    }

    @Override
    public List<DeviceMaintenanceRecords> queryDeviceMaintenanceRecords(LzQueryCriteria criteria) {
        return maintResumeMapper.queryDeviceMaintenanceRecords(criteria);
    }

    @Override
    public int countDeviceMaintenanceRecords(LzQueryCriteria criteria) {
        return maintResumeMapper.countDeviceMaintenanceRecords(criteria);
    }

	@Override
	public List<MaintenanceRecordDetail> queryMaintenanceRecordDetailById(long mId) {
		return maintResumeMapper.queryMaintenanceRecordDetailById(mId);
	}

	@Override
	public List<DeviceMaintenanceRecordsDetail> queryDeviceMaintenanceRecordDetailById(long mId) {
		return maintResumeMapper.queryDeviceMaintenanceRecordDetailById(mId);
	}

	/**
	 * 设备事故报告登记安卓接口
	 * @return
	 */
	@Override
	public List<AccidentReport> queryWaitRepairDeviceInter() {
		return maintResumeMapper.queryWaitRepairDeviceInter();
	}

	/**
	 * 设备维修申请登记安卓接口
	 * @return
	 */
	@Override
	public List<DeviceBreakdown> queryAccidentReportInter() {
		return maintResumeMapper.queryAccidentReportInter();
	}
}
